package deng.jboss.examples.slsb;

import javax.ejb.Remote;
import javax.ejb.Stateless;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


/**
 * @author Zemian Deng
 *
 */

@Remote(DummyService.class)
@Stateless
public class DummyServiceImpl implements DummyService {
	private static Logger logger = LoggerFactory.getLogger(DummyServiceImpl.class);
	
	private String parameter;
	
	@Override
	public void run() {
		logger.debug("Running service with paramter " + parameter);		
	}

	@Override
	public String runWithResult() {
		logger.debug("Running service with paramter " + parameter);
		String result = "Result: " + parameter;
		logger.debug("Returning result " + result);		
		return result;
	}

	@Override
	public void setParameter(String p) {
		parameter = p;
	}
}
